package example.webapp.controller;

import example.core.StormtrooperService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/troopers")
public class StormtrooperController {

    @Reference(url = "dubbo://localhost:20880")
    StormtrooperService service;

    @GetMapping("/")
    public Object list() {
        return service.listStormtroopers();
    }

}
